#include <iostream>
using namespace std;
class templateclass{
protected:
    virtual void promitive1()=0;
    virtual void promitive2()=0;

public:
    void templatemethod(){
        this->promitive1();
        this->promitive2();
    }
};
class ConcreateclassA:public templateclass{
    void promitive1(){
        cout<<"promitive1()"<<endl;
    }
    void promitive2(){}

};
class ConcreateclassB:public templateclass{
    void promitive1(){}
    void promitive2(){
        cout<<"promitive2()"<<endl;
    }
};
int main() {
    templateclass * p1 = new ConcreateclassA();
    templateclass * p2 = new ConcreateclassB();

    p1->templatemethod();
    p2->templatemethod();

}